import { createApp } from "vue";
import App from "./App.vue";
//fix Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler
// import "default-passive-events";
// iconfont css
import "@/assets/iconfont/iconfont.css";
// element plus
import ElementPlus from "element-plus";
// element css
import "element-plus/dist/index.css";
// // element dark(内置暗黑模式)
// import "element-plus/theme-chalk/dark/css-vars.css";
// custom element dark(自定义暗黑模式)
// import "@/styles/theme/element-default.scss";
import "animate.css/animate.min.css";
// CSS common style sheet
import "@/styles/common.scss";
// custom element css
import "@/styles/element.scss";
import "@/styles/animate.scss";

// custom directives
import directives from "@/directives/index";
// vue Router
import router from "@/routers/index";
// vue i18n
import I18n from "@/languages/index";
// pinia store
import pinia from "@/stores/index";
// svg icons
import "virtual:svg-icons-register";
// errorHandler
import errorHandler from "@/utils/errorHandler";
import appRefreshToken from "@/utils/refreshToken";
import VXETable from "vxe-table";

const app = createApp(App);

app.config.errorHandler = errorHandler;

(window as any)._AMapSecurityConfig = {
	securityJsCode: "3a6fc39472c9a5687f70be4cc9e0a982"
};
app.use(router).use(I18n).use(pinia).use(directives).use(ElementPlus).use(VXETable).mount("#app");

appRefreshToken();
